package tk.mybatis.springboot.listener;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;

import tk.mybatis.springboot.share.util.SystemUtils;
import tk.mybatis.springboot.wexin.util.DateUtils;

public class ContextListener implements ApplicationListener<ContextRefreshedEvent>{
	private static Logger logger = LogManager.getLogger(ContextListener.class);
	@Override
	public void onApplicationEvent(ContextRefreshedEvent arg0) {
		logger.info(DateUtils.getNowTime_6() + "开启项目");

		//加载容器上下文
  		SystemUtils.getSystemUtils().servletContextInit();
	}
}
